package com.water.camera.view;

import android.content.Context;
import android.graphics.Color;
import android.view.LayoutInflater;
import android.widget.FrameLayout;

import androidx.annotation.NonNull;

import com.water.camera.R;
import com.water.camera.databinding.CustomTabLayoutBinding;


public class CustomTabView extends FrameLayout {

    public CustomTabLayoutBinding binding;

    public CustomTabView(@NonNull Context context) {
        super(context);
        binding = CustomTabLayoutBinding.inflate(LayoutInflater.from(context), this, true);
    }

    @Override
    public void setSelected(boolean selected) {
        super.setSelected(selected);
        if (selected) {
            binding.tv.setBackgroundResource(R.drawable.shape_fde60f_radius8);
        } else {
            binding.tv.setBackgroundResource(R.drawable.bg_f7f7f7_8_radius);
        }
        binding.tv.setTextColor(selected ? 0xff333333 : 0xff666666);
    }
}
